package cn.bbstone.pisces2.util;

import cn.bbstone.pisces2.config.ConfigModel;

public class CtxUtil {
    private static ConfigModel configModel = null;

    public static ConfigModel getConfigModel() {
        return configModel;
    }

    public static void setConfigModel(ConfigModel configModel) {
        CtxUtil.configModel = configModel;
    }

//    public static BFileInfo reqNextFile(ChannelHandlerContext ctx) {
//        BFileInfo nextFile = ClientCache.nextFile();
//        log.info("nextFile: {}", nextFile);
//        if (nextFile != null) {
//            log.debug("after list files, req to download nextFile: {}", JSON.toJSONString(nextFile));
//            // FileReq
//            BFileMsg.BFileReq req = BFileUtil.buildReq(BFileCmd.REQ_FILE, nextFile.getFilepath());
//            ctx.write(req);
//            ctx.writeAndFlush(Unpooled.wrappedBuffer(ConstUtil.delimiter.getBytes(CharsetUtil.UTF_8)));
//            return nextFile;
//        }
//        return null;
//    }


}
